
package com.starshineworks.util.actions;

//import com.starshineworks.entities.UserDAO;
import com.starshineworks.util.Util;

import java.util.Map;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ActionLogout extends Action {
     
    @Override
    public boolean perform(HttpServletRequest  request, 
                           HttpServletResponse resp,
                           HttpServlet         serv, 
                           boolean             isMultiPart)
    {
        Map<String,String[]> map = request.getParameterMap();
        HttpSession sess = request.getSession();
        if (sess != null) {
            sess.invalidate();
        }
        return true;
    }
    
    @Override
    public String getNextPage() {
        return "Start";
    }
}
